﻿@using Yyyg.WebUI
@using Yyyg.WebUI.Models
@{
    Layout = "~/Views/Shared/_LayoutHome.cshtml";
    bool showmsk = ViewBag.ShowMask;
}
@section head{
    <link href="~/Content/home-index.css?@Yyyg.WebUI.Tools.GetRandMax()" rel="stylesheet" />
    <link href="~/Lib/3d3dSwiper/3dSwiper.css" rel="stylesheet" />
    <script src="~/Scripts/src/homeindex.js?@Yyyg.WebUI.Tools.GetRandMax()"></script>
    <script src="~/Lib/3d3dSwiper/3dSwiper.js"></script>
}
@model HomeIndexVM
<div class="cararea">
    <div class="top">
        <div class="swiper-container">
            <ul class="swiper-wrap" style="z-index:0">
                <li><a href="#"><img src="/Content/Images/lbt/lb1.png" /></a></li>
                <li><a href="#"><img src="/Content/Images/lbt/lb2.png" /></a></li>
                <li><a href="#"><img src="/Content/Images/lbt/lb3.png" /></a></li>
            </ul>
            <ul class="swiper-dots"></ul>
            <ul class="swiper-navigator">
                <li class="swiper-btn-prev iconfont icon-arrow-left-bold"></li>
                <li class="swiper-btn-next iconfont icon-arrow-right-bold"></li>
            </ul>
        </div>
    </div>
    <div class="btm">
        <div class="newjx-tit" style="writing-mode:tb-rl">
            最新揭晓
        </div>
        <div class="nbx">
            <ul class="newjx">
                @for (int i = 0; i < Model.NewAnnouns.Count; i++)
                {
                    var njx = Model.NewAnnouns[i];
                    <li class="home-newjx-item">
                        <div class="lef">
                            <h3 class="gtitle"><a href="/home/PrizeAbout?rhid=@njx.RushID">@njx.GdInfo.Title</a></h3>
                            <div>总需: <span class="allneed">@njx.GdInfo.Need_amo</span>人次</div>
                            <div>期号: <span class="qh">@njx.PerNum</span></div>
                            <div>获得者:<a class="winus">@njx.UserInfo.Petname</a></div>
                            <div>本期参与:<span class="cyrc">@njx.ByCount</span>人次</div>
                            <div>幸运号码:<span class="xynum">@njx.LottNum</span></div>
                        </div>
                        <div class="rig">
                            <a href="/home/PrizeAbout?rhid=@njx.RushID"> <img src="@njx.MainUrl" /></a>
                        </div>
                    </li>
                }
            </ul>
        </div>
    </div>
</div>
<div class="home-area hot-area">
    <div class="gd-area">
        <div class="tbox">
            <h3 class="title">最热商品</h3>
            <a class="more" href="#"><span>更多商品,点击查看>></span> </a>
        </div>
        <div class="gd-list">
            @for (int i = 0; i < Model.HotGoods.Count(); i++)
            {
                var v = Model.HotGoods[i];
                <div class="gd-item" data-rhid="@v.Rushinfo.Id" data-rem="@v.Rushinfo.Rem">
                    <a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id"><img title="点击查看商品详情" class="gdimg" src="@v.MainUrl" /></a>
                    <p class="blkfont gtitle"><a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id">@v.Info.Title</a></p>
                    <div class="bars">
                        <p class="minfont">总需：<span>@v.Info.Need_amo</span> 人次</p>
                        <div class="progbar">
                            <span style="width:@(v.Rushinfo.NowPercentage()+"%")" class="value"></span>
                        </div>
                        <div class="datas">
                            <div class="nums blkfont">
                                <span>@(v.Info.Need_amo-v.Rushinfo.Rem)</span>
                                <span>@v.Rushinfo.Rem</span>
                            </div>
                            <div class="txs">
                                <span>已参与人次</span>
                                <span>剩余人次</span>
                            </div>
                        </div>
                        <div></div>
                        <div></div>
                    </div>
                    <div class="btns">
                        <button title="立即一元云购" class="bynow">立即一元云购</button>
                        <button title="添加到购物车" class="addcar iconfont icon-tianjiadaogouwuche"></button>
                    </div>
                    <div data-gid="@v.Rushinfo.Goods.Gid" class="favorite" title="收藏/取消收藏">
                        <i class="layui-icon layui-icon-star"></i>
                    </div>
                </div>
            }
        </div>
    </div>
    <div class="rig">
        <div class="title">
            <span>最新中奖</span>
        </div>
        <div class="win-list">
            <ul class="rollist">
                @for (int i = 0; i < Model.NewAnnouns.Count; i++)
                {
                    var njx = Model.NewAnnouns[i];
                    <li class="item" style="background-color:@(i%2==0?"white":"#eee")">
                        <div>
                            <img class="uhead headimg" src="@Server.MapUserHead(njx.UserInfo.Uid)" />
                        </div>
                        <div class="blkfont">
                            <div>
                                <a class="uname">@njx.UserInfo.Petname</a>
                                <span class="date">@njx.Date.ToString("MM月dd日 HH:mm:ss")</span>
                            </div>
                            <div>
                                <b class="rc">@(njx.ByCount)人次</b>
                                <span>夺取</span>
                                <span class="gdname">@njx.GdInfo.Title</span>
                            </div>
                            <div>
                                <span>总需@(njx.GdInfo.Need_amo)人次</span>
                            </div>
                        </div>
                    </li>
                }
            </ul>
        </div>
        <div class="end">看看谁走狗屎运!</div>
    </div>
</div>
<div class="home-area soon-area">
    <div class="gd-area">
        <div class="tbox">
            <h3 class="title">即将揭晓</h3>
            <a class="more" href="#"><span>更多商品,点击查看>></span> </a>
        </div>
        <div class="gd-list gd-list-c5">
            @for (int i = 0; i < Model.SoonAnnouns.Count(); i++)
            {
                var v = Model.SoonAnnouns[i];
                <div class="gd-item" data-rhid="@v.Rushinfo.Id" data-rem="@v.Rushinfo.Rem">
                    <a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id"><img title="点击查看商品详情" class="gdimg" src="@v.MainUrl" /></a>
                    <p class="blkfont gtitle"><a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id">@v.Info.Title</a></p>
                    <div class="bars">
                        <p class="minfont">总需：<span>@v.Info.Need_amo</span> 人次</p>
                        <div class="progbar">
                            <span style="width:@(v.Rushinfo.NowPercentage()+"%")" class="value"></span>
                        </div>
                        <div class="datas">
                            <div class="nums blkfont">
                                <span>@(v.Info.Need_amo-v.Rushinfo.Rem)</span>
                                <span>@v.Rushinfo.Rem</span>
                            </div>
                            <div class="txs">
                                <span>已参与人次</span>
                                <span>剩余人次</span>
                            </div>
                        </div>
                        <div></div>
                        <div></div>
                    </div>
                    <div class="btns">
                        <button title="立即一元云购" class="bynow">立即一元云购</button>
                        <button title="添加到购物车" class="addcar iconfont icon-tianjiadaogouwuche"></button>
                    </div>
                    <div data-gid="@v.Rushinfo.Goods.Gid" class="favorite" title="收藏/取消收藏">
                        <i class="layui-icon layui-icon-star"></i>
                    </div>
                </div>
            }
        </div>
    </div>
</div>
<div class="home-area new-area">
    <div class="gd-area">
        <div class="tbox">
            <h3 class="title">最新商品</h3>
            <a class="more" href="#"><span>更多商品,点击查看>></span> </a>
        </div>
        <div class="gd-list gd-list-c5">
            @for (int i = 0; i < Model.NewGoods.Count(); i++)
            {
                var v = Model.NewGoods[i];
                <div class="gd-item" data-rhid="@v.Rushinfo.Id" data-rem="@v.Rushinfo.Rem">
                    <a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id"><img title="点击查看商品详情" class="gdimg" src="@v.MainUrl" /></a>
                    <p class="blkfont gtitle"><a href="/Home/GoodAbout?rhid=@v.Rushinfo.Id">@v.Info.Title</a></p>
                    <div class="bars">
                        <p class="minfont">总需：<span>@v.Info.Need_amo</span> 人次</p>
                        <div class="progbar">
                            <span style="width:@(v.Rushinfo.NowPercentage()+"%")" class="value"></span>
                        </div>
                        <div class="datas">
                            <div class="nums blkfont">
                                <span>@(v.Info.Need_amo-v.Rushinfo.Rem)</span>
                                <span>@v.Rushinfo.Rem</span>
                            </div>
                            <div class="txs">
                                <span>已参与人次</span>
                                <span>剩余人次</span>
                            </div>
                        </div>
                        <div></div>
                        <div></div>
                    </div>
                    <div class="btns">
                        <button title="立即一元云购" class="bynow">立即一元云购</button>
                        <button title="添加到购物车" class="addcar iconfont icon-tianjiadaogouwuche"></button>
                    </div>
                    <div data-gid="@v.Rushinfo.Goods.Gid" class="favorite" title="收藏/取消收藏">
                        <i class="layui-icon layui-icon-star"></i>
                    </div>
                </div>
            }
        </div>
    </div>
</div>
<div id="gomyyg" style="display:@(showmsk?"flex":"none")">
    <div class="center">
        <p class="text">你有夺宝开奖啦,快去看看<b>幸运儿</b>是不是你吧!</p>
        <div class="content">
            <a class="gobtn iconfont" href="/userinfo/myyg?tjx=1">前往查看 &#xe68e;</a>
        </div>
        <i class="close layui-icon layui-icon-close"></i>
    </div>
</div>